//
//  XHRPictureDriftCell.m
//  CollectionView实现无限分页
//
//  Created by 胥鸿儒 on 16/5/15.
//  Copyright © 2016年 xuhongru. All rights reserved.
//

#import "XHRPictureDriftCell.h"
#import <UIImageView+WebCache.h>
@interface XHRPictureDriftCell()

@property(nonatomic,weak)UIImageView *iconView;


@end


@implementation XHRPictureDriftCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self setupIconView];
    }
    return self;
}

- (void)setupIconView
{
    UIImageView *iconView = [[UIImageView alloc]init];
    
    self.iconView = iconView;
    [self.contentView addSubview:iconView];
    
    [iconView makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(UIEdgeInsetsMake(0, 0, 0, 0));
    }];
    
}

- (void)setImageName:(NSString *)imageName
{
    _imageName = imageName;
    
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:imageName] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
    }];
    
}





@end
